<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$setting.webname}</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <link rel="shortcut icon" href="/public/static/admin/uploads/set/{$setting['ico']}">
    <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/base.css">
    <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/home.css">
    <script type="text/javascript" src="/public/static/home/themes/js/jquery.min.js"></script>
    <script type="text/javascript" src="/public/static/home/themes/js/slider.js"></script>
    <script type="text/javascript" src="/public/static/home/themes/js/tab.js"></script>
    <meta name="displace" content="{$setting.description}">
    <meta property="og:title" content="{$setting.webname}" />
    <meta property="og:url" content="{$setting.weburl}" />
    <meta property="og:image" content="{$setting.weburl|substr=###,0,-1}/public/static/admin/uploads/set/{$setting.wx_img}" />
    <meta property="og:description" content="{$setting.description}" />
    <meta property="og:site_name" content="" />
    <meta property="og:type" content="" />
    <meta property="og:article:author" content="" />
</head>

<body>
<section class="aui-flexView">
    <header class="aui-navBar aui-navBar-fixed">
        <a href="javascript:;" class="aui-navBar-item">
            <i class="icon "></i>
        </a>
        <div class="aui-center">
            <span class="aui-center-title">首页</span>
        </div>
        <a href="javascript:;" class="aui-navBar-item">
            <i class="icon icon-sys"></i>
        </a>
    </header>
    <section class="aui-scrollView">
        <div class="m-slider" data-ydui-slider>
            <div class="slider-wrapper">
                {foreach  $slide as $vs}
                    <div class="slider-item">
                        <a href="javascript:;">
                            <img src="/public/static/admin/uploads/slide/{$vs.url}">
                        </a>
                    </div>
                {/foreach}
            </div>
            <div class="slider-pagination"></div>
        </div>
        <div class="aui-grids">
            <a href="{:url('Newss/index')}" class="aui-grids-item">
                <div class="aui-grids-item-icon">
                    <img src="/public/static/home/themes/img/icon/icon-kp.png" alt="">
                </div>
                <div class="aui-grids-item-text">动态</div>
            </a>
            <a href="{:url('Videos/index')}" class="aui-grids-item">
                <div class="aui-grids-item-icon">
                    <img src="/public/static/home/themes/img/icon/icon-item012.png" alt="">
                </div>
                <div class="aui-grids-item-text">视频中心</div>
            </a>
            <!--<a href="course.html" class="aui-grids-item">-->
            <!--    <div class="aui-grids-item-icon">-->
            <!--        <img src="/public/static/home/themes/img/icon/icon-head-002.png" alt="">-->
            <!--    </div>-->
            <!--    <div class="aui-grids-item-text">课程</div>-->
            <!--</a>-->
            <a href="{:url('My/search')}" class="aui-grids-item">
                <div class="aui-grids-item-icon">
                    <img src="/public/static/home/themes/img/icon/icon-eye2.png" alt="">
                </div>
                <div class="aui-grids-item-text">录取查询</div>
            </a>
            <!--<a href="mate.html" class="aui-grids-item">-->
            <!--    <div class="aui-grids-item-icon">-->
            <!--        <img src="/public/static/home/themes/img/icon/icon-head-004.png" alt="">-->
            <!--    </div>-->
            <!--    <div class="aui-grids-item-text">同学</div>-->
            <!--</a>-->
            <a href="{:url('My/know')}?k=xxjj" class="aui-grids-item">
                <div class="aui-grids-item-icon">
                    <img src="/public/static/home/themes/img/icon/icon-artice.png" alt="">
                </div>
                <div class="aui-grids-item-text">学校简章</div>
            </a>
            <a href="{:url('Classroom/index')}" class="aui-grids-item">
                <div class="aui-grids-item-icon">
                    <img src="/public/static/home/themes/img/icon/icon-item005.png" alt="">
                </div>
                <div class="aui-grids-item-text">在线课堂</div>
            </a>
            <a href="{:url('Photos/index')}" class="aui-grids-item">
                <div class="aui-grids-item-icon">
                    <img src="/public/static/home/themes/img/icon/icon_xw.png" alt="">
                </div>
                <div class="aui-grids-item-text">校园生活</div>
            </a>

            <a href="javascript:is_atten()" class="aui-grids-item">
                <div class="aui-grids-item-icon">
                    <img src="/public/static/home/themes/img/icon/icon-qiandao.png" alt="">
                </div>
                <div class="aui-grids-item-text">点名</div>
            </a>
            <a href="tel:{$setting.gf_tel}" class="aui-grids-item">
                <div class="aui-grids-item-icon">
                    <img src="/public/static/home/themes/img/icon/tel.png" alt="">
                </div>
                <div class="aui-grids-item-text">咨询官方</div>
            </a>
            <!--<a href="question.html" class="aui-grids-item">-->
            <!--    <div class="aui-grids-item-icon">-->
            <!--        <img src="/public/static/home/themes/img/icon/icon-head-006.png" alt="">-->
            <!--    </div>-->
            <!--    <div class="aui-grids-item-text">问答</div>-->
            <!--</a>-->
        </div>
        <div class="divHeight"></div>
        <div class="aui-coll-title">
            <h2>热门推荐</h2>
        </div>
        <div class="aui-coll-ad">
            {$rmtj}
        </div>
        <div class="aui-coll-user">
            {foreach $news as $vs}
            <a href="{:url('Newss/detail')}?id={$vs.id}" class="aui-coll-user-list b-line">
                <div class="aui-flex">
                    <div class="aui-user-img" style="background:#fe5a69;text-align: center;color:#fff;line-height: 2rem;border-radius: 0.5rem">
                       {$vs.tt}
                    </div>
                    <div class="aui-flex-box">
                        <h2 title="">{if condition="strlen($vs.title)>10"}{$vs.title|mb_substr=###,0,10,'utf-8'}……{else /}{$vs.title}{/if} {if condition="$vs.sorttype==1"}<em>top</em>{/if}</h2>
                        <p>{$vs.author} {$vs.create_time}</p>
                    </div>
                    <div class="aui-flex-follow">
                        <button> <i class="icon icon-follow"></i> {$vs.hits} </button>
                    </div>
                </div>
                <div class="aui-text-box">
                    <div class="aui-text-head">
                        <p><em>#{$vs.key}#</em> {if condition="strlen($vs.title)>30"}{$vs.title|mb_substr=###,0,30,'utf-8'}……{else /}{$vs.title}{/if}</p>
                    </div>
                    <div class="aui-text-img">
                        <img src="{$vs.cover}" alt="" width="100%">
                    </div>
                </div>
            </a>
            {/foreach}
        </div>
    </section>
    {include file="public/footer"}
</section>
<script src="/public/static/admin/layui/layui.js"></script>
<script>
    layui.use('upload', function() { //独立版的layer无需执行这一句
        var $ = layui.jquery, layer = layui.layer, upload = layui.upload; //独立版的layer无需执行这一句
        window.is_atten = ()=>{
            $.post("{:url('Attendancess/is_atten')}",{},function(data){
                console.log(data.c);
                if(data.c == 1 ){
                    location.href = "{:url('Attendancess/index')}"
                }else if(data.c == "login") {
                    location.href = "{:url('Login/logins')}"
                }else{
                    layer.msg("您不需要参与点名",{time:2000,shade:0.8});
                }
            })
        }
    });
</script>
</body>
</html>
